<template>
	<view class="p10">
	 
		<view class="contbox ptb-20">
			<view class="market_list" style="" v-for="item in notice_list" @click="tonotice(item.id)">
				<view class="" style="width: 58%;">
					<view class="market_list_title fw" style="">
						{{item.title}}
					</view>
					<view class="flex1 size-20 market_list_category_name" style="">
						<view class="market_list_category_name_left">
							{{item.category_name}}
						</view>
						<view class="size-24">
							{{item.create_time}}
						</view>
					</view>
				</view>
				<view class="rightbox">
					<image class="photo" :src="item.image" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import uParse from '@/components/u-parse/u-parse.vue'
	export default {
		 components: {
		    uParse
		  },
		data() {
			return {
				content: '',
				title: '',
				create_time: '',
				desc: "",
				content: '',
				id:'',
				name:'',
				notice_list: [],
			}
		},
		onLoad(options) {
			// console.log(id.id);
			this.id = options.id
			this.name=options.name
			this.$http('api/index/noticeList', {
				id: this.id,
				name: this.name
			}).then(res => {
				console.log(res);
				this.notice_list = res
				// this.title = res.title
				// this.create_time = res.create_time
				// this.desc = res.desc
				// this.content = res.content
			});
		},
		onShow() {
			this.init()

		},
		methods: {
			init() {

			},
			// 平台公告列表跳转
			tonotice(id) {
				console.log(id);
				uni.navigateTo({
					url: '/pages/market/noticeDetail?id=' + id
				})
			},
		}
	}
</script>
<style lang="less" scoped>
.rightbox {
		width: 260rpx;
		background-color: aqua;
		height: 140rpx;
	}
.market_list_category_name_left {
		background-color: #f6f6f6;
		width: 130rpx;
		height: 50rpx;
		text-align: center;
		line-height: 50rpx;
		margin: -14rpx 0 0 0;
		color: #999;
		border-radius: 24rpx;
	}

	.market_list_category_name {
		justify-content: space-between;
		margin: 30rpx 0 0 0;
	}

	.market_list_title {
		height: 80rpx;
		width: 400rpx;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		overflow: hidden;


	}

	.market_list {
		display: flex;
		justify-content: space-between;
		border-bottom: 3rpx solid #E0E0E0;
		margin: 0px 0px 10px 0;
		height: 160rpx;
	}
.contbox {
		.contentitem {
			border-bottom: 1rpx solid #E0E0E0;

			.imgbox {
				height: 220rpx;
				overflow: hidden;

				image {
					width: 100%;
				}
			}

			.leftbox {
				.text_title {
					font-weight: 600;
				}

				.tipsbox {
					margin-top: 100rpx;
					font-size: 12rpx;

					.tipsborder {
						border: 1rpx solid rgb(108, 126, 205);
						border-radius: 10rpx;
						color: rgb(108, 126, 205);
						background-color: rgb(239, 246, 255);
					}
				}
			}

			.contenttit {
				overflow: hidden;
				text-overflow: ellipsis;
				white-space: nowrap;
			}

			.tipsbox {
				margin-top: 16rpx;
				font-size: 12rpx;

				.tipsborder {
					border: 1rpx solid rgb(108, 126, 205);
					border-radius: 10rpx;
					color: rgb(108, 126, 205);
					background-color: rgb(239, 246, 255);
				}
			}
		}
	}
</style>
